﻿@using Webdiyer.WebControls.Mvc;
@model PagedList<Inspinia_MVC5.Models.Class>

    <table class="table table-striped">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Department.DepartName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.ClassName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.ClassDesc)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Department.DepartName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ClassName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ClassDesc)
                </td>
                <td>
                    @Html.ActionLink("详情", "Details", new { id = item.ClassId }, new { @class = "btn btn-primary btn-sm" })
                    @Html.ActionLink("编辑", "Edit", new { id = item.ClassId }, new { @class = "btn btn-white btn-sm" })
                    @Html.ActionLink("删除", "Delete", new { id = item.ClassId }, new { @class = "btn btn-white btn-sm" })
                </td>
            </tr>
        }

    </table>
